package com.gm;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.Rectangle2D;

/**
 * Created by Administrator on 13-12-14.
 */
public class NotHelloPanel extends JPanel{
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawString("Not Hello wrold Program",MSG_X,MSG_Y);

        Graphics2D g2=(Graphics2D)g;
        double rect_x=100,rect_y=150,rect_width=100,rect_height=100;

        Rectangle2D rect1=new Rectangle2D.Double(rect_x,rect_y,rect_width,rect_height);
        g2.draw(rect1);
    }

    private final int MSG_X=75;
    private final int MSG_Y=100;
}
